#include <iostream>

int main()
{
    int *p = new int[4]{1, 2, 3, 4};
    *(p - 1) = -10;
    *p = 10;
    p++;
    p[0] = 20;
    *(p+1) = 30;
    p++;
    p[1] = 40;
    p[2] = -50;

    for(int i = 0; i < 10; i++)
    {
        std::cout << "array[" << i << "] = " << std::to_string(*(p - 3 + i)) << std::endl;
    }
}